package org.anddev.andengine.extension.svg.node;
/**
 * @author Eric Depta
 * @since 01:14:00 - 28.02.2011
 */
import org.anddev.andengine.extension.svg.SVGDoc;
import org.anddev.andengine.extension.svg.SVGPath;
import org.anddev.andengine.extension.svg.util.parser.ParserUtil;
import org.anddev.andengine.extension.svg.util.transform.TransformDoc;
import org.anddev.andengine.util.SAXUtils;
import org.xml.sax.Attributes;

public class PolygonNode extends PathNode {
	public PolygonNode(final SVGDoc pSVGDoc){
		super(pSVGDoc);
	}
	
	public void create(final Attributes pAttributes, final TransformDoc pTransform){
		super.create(pAttributes, pTransform);
	}
	
	@Override
	protected void createPath(final Attributes pAttributes){
		this.svgPath = new SVGPath(
			ParserUtil.createVectorList(SAXUtils.getAttributeOrThrow(pAttributes, TAG_ATTRIBUTE_POINTS)),
			true
		);
	}
}
